unit DllImportUnit;

interface

uses
  Windows,
  SysUtils;

const
  MRVSDll = 'MRVS.dll';
var
  DllHandle: THandle;

//  fcGetPartition: procedure(szInfo: PChar); stdcall;
//  fcSetPartition: procedure(szInfo: PChar); stdcall;
//  fcCheckPassword: function(szPwd: PChar): Boolean; stdcall;
//  fcSetPassword: procedure(szPwd: PChar); stdcall;
//  fcGetProtection: function: DWORD; stdcall;
//  fcSetProtection: procedure(iParam: DWORD); stdcall;
  function fcGetPartition(szInfo: PChar): Boolean; stdcall; external MRVSDll;
  function fcSetPartition(szInfo: PChar): Boolean; stdcall; external MRVSDll;
  function fcCheckPassword (szPwd: PChar): Boolean; stdcall; external MRVSDll;
  procedure fcSetPassword(szPwd: PChar); stdcall; external MRVSDll;
  function fcGetProtection: Boolean; stdcall; external MRVSDll;
  function fcSetProtection(iParam: Boolean): Boolean; stdcall; external MRVSDll;
//  procedure fcGetPartition(szInfo: PChar); stdcall; external MRVSDll;
//  procedure fcSetPartition(szInfo: PChar); stdcall; external MRVSDll;
//  function fcCheckPassword (szPwd: PChar): Boolean; stdcall; external MRVSDll;
//  procedure fcSetPassword(szPwd: PChar); stdcall; external MRVSDll;
//  function fcGetProtection: DWORD; stdcall; external MRVSDll;
//  procedure fcSetProtection(iParam: DWORD); stdcall; external MRVSDll;

implementation

//function LoadDll: Boolean;
//begin
//  DllHandle := LoadLibrary(PChar( DllName ));
//  if DllHandle <> 0 then
//  begin
//    @fcGetPartition := GetProcAddress(DllHandle, 'fcGetPartition');
//    @fcSetPartition := GetProcAddress(DllHandle, 'fcSetPartition');
//    @fcCheckPassword := GetProcAddress(DllHandle, 'fcCheckPassword');
//    @fcSetPassword := GetProcAddress(DllHandle, 'fcSetPassword');
//    @fcGetProtection := GetProcAddress(DllHandle, 'fcGetProtection');
//    @fcSetProtection := GetProcAddress(DllHandle, 'fcSetProtection');
//  end;
//end;
//
//function UnloadDll: Boolean;
//begin
//  if DllHandle <> 0 then
//  begin
//    @fcGetPartition := nil;
//    @fcSetPartition := nil;
//    @fcCheckPassword := nil;
//    @fcSetPassword := nil;
//    @fcGetProtection := nil;
//    @fcSetProtection := nil;
//    FreeLibrary( DllHandle );
//  end;
//end;
//
//initialization
//  LoadDll;
//
//finalization
//  UnloadDll;

end.
